<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>信息发布</title>
 <script type="text/javascript" src="../ueditor/editor_config_1.js"></script>
 <script type="text/javascript" src="../ueditor/editor_all.js"></script>
 <link rel="stylesheet" href="../ueditor/themes/default/ueditor.css"/>
 <link rel="stylesheet" rev="stylesheet" href="../css/style.css" type="text/css" media="all" />
 <script language="javascript" type="text/javascript"> 
	//提交并验证表单
	function CheckForm()
	{ 
		document.getElementById("form").action="<%= basePath%>main/addinfo.action";
		if(editor.hasContents()){  //提交条件满足时提交内容
	    editor.sync();           //此处的editor是页面实例化出来的编辑器对象
	    document.getElementById('form').submit();
		}
		return   true;
	}
	function check()
	{
	document.getElementById("aa").style.display="";
	}
</script>
</head>

<body class="ContentBody">
 <form action="<%= basePath %>main/addinfo.action" method="post" name="form" id="form" target="mainFrame">
  <div class="MainDiv">
  <table class="CContent" border="0" cellpadding="0" cellspacing="0" width="99%">
    <tbody>
      <tr>
        <th class="tablestyle_title">发布信息</th>
      </tr>
      <tr>
        <td class="CPanel">
           <table style="width: 100%;" border="0" cellpadding="0" cellspacing="0">
          <tbody>
            <tr>
              <td align="left"> 
			  <input name="Submit" value="保存" class="button" onclick="CheckForm()" type="button" />　 
			  <input name="Submit2" value="返回" class="button" onclick="window.history.go(-1);" type="button" /> </td>
            </tr>
            <tr>
              <td width="100%">
              <fieldset style="height: 100%;"> <legend>信息内容</legend>
              <table style="width: 100%;" border="0" cellpadding="2" cellspacing="1">
                <tbody>
                  <tr>
                    <td align="left" nowrap="nowrap" width="20%">信息标题：
                     <input name="info.title" class="text" style="width: 350px;" size="40" type="text" title="请在这里输入信息标题"/>20字内
					 <span class="red"> *为必填,下同</span> </td>
                  </tr>
                  <tr>
                    <td style="vertical-align: top;">信息类型：
					<select id="mainclass" name="info.type">
					<option value="0">爱心屋新闻</option>
					<option value="1">爱心屋通知</option>
					<option value="2">爱心屋鸣谢</option>
					<option value="3">爱心屋感想</option>
					</select>
                    </td>
                  </tr>
				  <tr>
				  <hr>
				  </tr>
                  <tr>
                    <td align="left" nowrap="nowrap" width="3%">发布作者（部门）：
                     <input name="info.author" class="text" style="width: 250px;" size="40" value="学生勤工助学中学中心" type="text" /><span class="red"> *</span> </td>
                  </tr> 
                  <tr>
                    <td align="left" nowrap="nowrap"><legend>信息正文：</legend></td>
                  </tr>
				  
				    <tr>
                    <td align="left" nowrap="nowrap"><hr/></td>
                  </tr>
                  <tr>
						<!-- 通过request取值 -->
						<td>
						<script type="text/plain" id="baiduUe"> 请在这里编辑你的信息正文！❤<img src="/ShopOnline/ueditor/dialogs/emotion/images/jx2/j_0016.gif" border="0" hspace="0" vspace="0" /></script>
						</td>
				  </tr>	
			    </tbody>
			   </table>
				  
			  </fieldset>
			  </td>
			</tr>	
		 </tbody>
		</table>
		</td>
	  </tr>
	</tbody>
  </table>
  </div>
 </form>
 <script type="text/javascript">
   var editor = new baidu.editor.ui.Editor({
	   			textarea:'info.text'
    });
    editor.render("baiduUe");
</script>
</body></html>